package com.laowang.common.utils;




import java.util.Random;

public class RandomUtils {

  public static final String ALLCHAR = "0123456789";

  public RandomUtils() {
  }

  public static String String(int length) {
    StringBuilder sb = new StringBuilder();
    Random random = new Random();

    for(int i = 0; i < length; ++i) {
      sb.append("0123456789".charAt(random.nextInt("0123456789".length())));
    }

    return sb.toString();
  }

  /*public static String randomSalt() {
    SecureRandomNumberGenerator secureRandom = new SecureRandomNumberGenerator();
    String hex = secureRandom.nextBytes(3).toHex();
    return hex;
  }*/
}
